#ifndef _MATRIX_H
#define _MATRIX_H


#ifdef __cplusplus
extern "C"
{
#endif


/* ========================================================================== */
/*                           FUNCTION DEFINITIONS                             */
/* ========================================================================== */

/* \fn
 *
 * \brief   Math Library - Matrix operation
 *
 */


double VecNorm(int dim, double vec[]);
double VecDotMul(int dim, double vec1[], double vec2[]);//
void VecCross(double vec1[], double vec2[], double vec3[]);
void VecToCrossMulMat(double vec[], double mat[]);
void TwoVec_OrthogMatrix(double x1[3], double x2[3], double M[3*3]);//
void VecUnit(int dim, double vec1[], double vec2[]);//

void MatZero(int row, int column, double mat[]);
void MatMulScalar(int row,int column,double mat1[],double scalar,double mat2[]);//
void MatMul(int row, int middle, int column,double mat1[], double mat2[], double mat3[]);
void MatEquald(int row, int column, double mat1[], double mat2[]);
void MatEqualf(int row, int column, double mat1[], double mat2[]);
void MatAdd(int row, int column, double mat1[], double mat2[], double mat3[]);
void MatMinusd(int row, int column, double mat1[], double mat2[], double mat3[]);
void MatMinusf(int row, int column, double mat1[], double mat2[], double mat3[]);
void MatTrans(int row, int column, double mat1[], double mat2[]);
void MatUnit(int N, double mat[]);
void MatSetBlock(int row,int col, int StartRow,int StartCol,int EndRow, int EndCol, double BlockMat[],double Mat[]);
int MatInverse(int N, double mat1[], double mat2[]);


#ifdef __cplusplus
}
#endif /* extern "C" */


#endif


/* ========================================================================== */
/*                                END OF FILE                                 */
/* ========================================================================== */
